<?php
/**
 * View AJAX - Tab Booking Live  LaFabbrica.org
 * 
 * @author     luigi.pastore (gigi@la-fabbrica.org)
 * @created    22-nov-2011
 * @package    LaFabbrica
 * @copyright  Copyright (c) 2011 Luigi Pastore
 */
?>
<?php if( count( $this->live_list ) > 0 ) :
    foreach( $this->live_list as $live ): 
        list( $y, $m, $d ) = explode( '-', $live['live_date'] );
    ?>
    <tr class="selectable">
        <td class="date">
            <h3>
                <b><?php echo $d ?> <?php echo $this->months[sprintf( '%01d', $m )] ?> <?php echo $y ?></b>
                <span><?php echo $this->days[date( 'N', mktime( $hour, $minute, $second, $m, $d, $y ) )] ?></span>
            </h3>		
        </td>
        <td class="artists">
        <?php 
        $main_artists = null;
        $openingact_artists = null;
        if( count( $live['artists']['main'] ) > 0 ):
            foreach( $live['artists']['main'] as $artist ):  
                $main_artists .= $artist['artist_name'] .', ';
            endforeach;
        endif; ?>

        <strong><?php echo substr( $main_artists, 0, -2 ) ?></strong>
        <?php 
        if( count( $live['artists']['openingact'] ) > 0 ):
            foreach( $live['artists']['openingact'] as $artist ):  
                $openingact_artists .= $artist['artist_name'] .', ';
            endforeach; 
        ?>
        <br/> 
        + <span><?php echo substr( $openingact_artists, 0, -2 ) ?></span>
        <?php endif; ?>
        </td>
        <td class="location">
            <?php echo $live['location_name'] ?>, <strong><?php echo $live['location_city'] ?></strong> (<?php echo $this->province[$live['location_province_id']]['province_short_name'] ?>)
        </td>
    </tr>
    <?php endforeach;
else:
    ?><tr class="result"><td colspan="3">Nessun live programmato...</td></tr> <?php	
endif;?>